home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Graphics 2D / ZoomRecter / ReadMe < prev    next >
Encoding:
Text File  |  2000-09-28  |  2.7 KB  |  44 lines  |  [TEXT/ttxt]

  1. Read Me About...<Sample Name>
  2. date 08/2000
  3.  
  4. (Outdated description....)
  5. This snippet shows how to do "Finder" style zooming between two rectangles.The boolean flag "kZoomLarger" controls the proportional direction of the zooming.
  6.     
  7. To get the two rectangles, you drag them out rubberbanded, and the zoomoccurs between them.  To quit, click the close box.
  8.     
  9. If you want to do zooms between windows, open up a port with the dimensionsof the desktop (from GetGrayRgn()).
  10.  
  11. DON'T use this as a sample of how to do rubberband drawing!!!  It's sort of hacked together bypassing the event mechanism and just using Button(). 
  12.  
  13. Carbonized Version Description
  14. While I am not the original author of this sample, while carbonizing various Quickdraw2D samples for the sample code website, I found this one particularly "cool."  I have added an event loop and some additional logic to make the sample a little more friendly.  Menus still do not work (simply to demonstrate the "zoom" concept, there are other samples which demonstrate menus) and clicking on the "close" box exits the program like before.  Enjoy!
  15.  
  16.  
  17. Building the Code
  18. This project was built and tested on CodeWarrior 2.1 using CarbonLib 1.1a3.  Since this is a Carbon app, the "Carbon Support" folder of the CarbonSDK should be in the same folder as the CodeWarrior IDE.  If this is not the case, the CarbonLib library will have to be re-added to the project.  In addition, the CarbonLib extension needs to be in the extension folder.  The CarbonSDK (which contains the library and the extension) can be found on Apple's website:  http://developer.apple.com/sdk/
  19.  
  20. Restrictions
  21. Nearly every sample requires more memory than the 384KB CodeWarrior sets as the default heap size.  If for some reason the memory has been reset to the default (either through converting the project or whatever) the memory should be reset to 1000 - 2000KB (depending on the application).  This can be achieved by going to the projects settings (Edit Menu->C-PPC Settings... under CodeWarrior 2.1) and selecting the "PPC Target" under the "Target" tab.
  22.  
  23. Other Code Notes
  24. This sample used to be a "non-Carbon" sample, but has been carbonized for demonstration purposes.  The "old" code has been left in (commented out) in order to compare and contrast the Carbon versus non-Carbon APIs.
  25.  
  26. Known Bugs
  27. Menus do not work.  Not a bug, this is intentional.
  28.  
  29. Possible Future Enhancements
  30. None at present.
  31.  
  32. Other Sources of Reference
  33. Additional sample code can be found at:
  34. http://developer.apple.com/samplecode/
  35. in addition, the Carbon API can be found at:
  36. http://developer.apple.com/techpubs/carbon/carbon.html
  37.  
  38. Version History
  39. See source for version history.
  40.  
  41. Author
  42. JM - Apple Developer Technical Support - dts@apple.com
  43.  
  44.